package com.atguigu.juc.day01.create;

import java.util.Arrays;
import java.util.List;

public class Demo06ParallelCompute {

    public static void main(String[] args) {
        List<String> list = Arrays.asList("a", "b", "c", "d", "e");

        // 串行计算
        list.stream().forEach(System.out::print);

        System.out.println();

        // 并行计算
        list.parallelStream().forEach(System.out::print);
    }

}
